import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm'

import { BlogModule } from './blog/blog.module';
import {TagModule} from './tag/tag.module'
import { MenuModule } from './menu/menu.module';
import { UserModule } from './user/user.module';
import { RoleModule } from './role/role.module';
import { AWordModule } from './aWord/aWord.module';

@Module({
  imports: [
    TypeOrmModule.forRoot({
      type: 'mysql',
      host: 'localhost',
      port: 3306,
      username: 'root',
      password: 'root',
      database: 'tyk_blog',
      entities: [__dirname + '/**/*.entity{.ts,.js}'],
      synchronize: true,
    }),
    BlogModule,
    TagModule,
    MenuModule,
    UserModule,
    RoleModule,
    AWordModule,
  ],
})
export class AppModule {}
